﻿'use strict';

/* ****************************************************************
BillingServiceProxy:
+ Events:
    + after
    + before
    + failed
    + success
**************************************************************** */

define([
    'webServiceProxy',
], function (WebServiceProxy) {
    var Class = WebServiceProxy.extend({
        defaults: _.extend(
            {}, //Add empty object to not extend base classs defaults.
            WebServiceProxy.prototype.defaults,
            {
                url: 'http://localhost/wcf/billing/',
            }
        ),

        runProcedure: function (data, options) {
            if (!data) data = {};

            return this.request(
                'runProcedure',
                JSON.stringify(data),
                _.extend(options, { type: 'POST', })
            );
        },
    });

    return Class;
});